[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FERROR
. Summary
ferror(int <fh>);
. Description
The ferror function checks the error flag for a file represented by
the file handle <fh>. The error flag stays set until it is cleared
with fclearerr or the file is closed.
. Return Value
A non-zero (TRUE) value is returned if the file's error flag is set.
. Example
int f;
f = fopen("test.dat", "r"); // open file only for reading
fputs("This should set the error flag!", f);
if (ferror(f))
prints("Error writing to file!");
See Also:
fclearerr
feof
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson